package com.productivity.model.animation;

import com.productivity.model.common.Direction;
import com.productivity.model.common.Vertex3D;

public class StandingAnimation extends Animation {
	private float[][] verts = {{0.00000f, -0.00000f, 0.00000f, 0.64952f, -0.37500f, 0.00000f, 0.64952f, -0.37500f, 0.00000f, 0.64952f, -1.12500f, 0.00000f, 0.00000f, -0.00000f, 0.00000f, -0.64952f, -0.37500f, 0.00000f, -0.64952f, -0.37500f, 0.00000f, -0.64952f, -1.12500f, 0.00000f, 0.00000f, -0.00000f, 0.00000f, 0.00000f, -1.00000f, 0.00000f, 0.00000f, -1.00000f, 0.00000f, -0.50000f, -1.86603f, 0.00000f, -0.50000f, -1.86603f, 0.00000f, -0.50000f, -2.86603f, 0.00000f, 0.00000f, -1.00000f, 0.00000f, 0.50000f, -1.86603f, 0.00000f, 0.50000f, -1.86603f, 0.00000f, 0.50000f, -2.86603f, 0.00000f}};
	
	public StandingAnimation(AnimationListener listener, Direction dir) {
		super(listener);
		duration = 1;
		repeats = true;
		type = AnimationType.STAND;
		frames = new Vertex3D[verts.length][verts[0].length/3];
		for(int i = 0; i < verts.length;i++) {
			for(int j = 0; j < frames[i].length;j++) {
				frames[i][j] = new Vertex3D(((dir==Direction.LEFT)?-1:1) * verts[i][j*2],verts[i][(j*2)+1],verts[i][(j*2)+2]);
			}
		}
	}
}
